package mytest;

import com.zxy.Dao.UserDao;
import com.zxy.entity.User;
import com.zxy.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class Demo {

    @Test
    public void test01 () {
        System.out.println("hello");
    }

    @Test
    public void mybatisTest() {
        SqlSession session = SqlSessionFactoryUtil.getSqlSession();
        UserDao userDao = session.getMapper(UserDao.class);

        User u = userDao.login(new User("admin","111"));
        System.out.println(u);
    }
}
